<?php
    $base64 = file_get_contents('video.txt');


    var arr = dataurl.split(',');
    var mime = arr[0].match(/:(.*?);/)[1];
    // 结果：   image/png
    console.log("arr[0]====" + JSON.stringify(arr[0]));
    //   "data:image/png;base64"
    console.log("arr[0].match(/:(.*?);/)====" + arr[0].match(/:(.*?);/));
    // :image/png;,image/png
    console.log("arr[0].match(/:(.*?);/)[1]====" + arr[0].match(/:(.*?);/)[1]);
    //   image/png
    var bstr = atob(arr[1].replace(/\s/g, ''));
    var n = bstr.length;
    var u8arr = new Uint8Array(n);
    while (n--) {
    u8arr[n] = bstr.charCodeAt(n);
    }
    return new Blob([u8arr], {
    type : mime
    });
